package com.golf.player;

import com.golf.core.course.bodies.Vector;
import com.golf.core.player.Player;

public class BadPlayer implements Player
{

    private String name;
    
    public BadPlayer(final String name)
    {
        this.name = name;
    }

    
    public String name()
    {
        return name;
    }
    
    
    public Vector chooseShot()
    {
        try
        {
            Thread.sleep(500);
        } 
        catch (InterruptedException e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        
        return null;
    }
    
    
    /**
     * {@inheritDoc}
     */
    public boolean equals(Object obj)
    {
        return name.equals(((BadPlayer)obj).name());
    }

    
    /**
     * {@inheritDoc}
     */
    public int hashCode()
    {
        return name.hashCode();
    }

}
